<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Amaze Irest</title>
    <meta name="description" content="">
    <meta name="keywords" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="assets/i/favicon.png">
    <link rel="stylesheet" href="http://cdn.amazeui.org/amazeui/2.4.2/css/amazeui.min.css">
    <link rel="stylesheet" href="assets/css/app.css">
</head>
<body>
<header data-am-widget="header" class="am-header am-header-default am-header-fixed ">
    <div class="am-header-left am-header-nav">
        <a class="" href="menu_nav.html">
            < Irest / Update Log
        </a>
    </div>
    <!--
    <h1 class="am-header-title">Amaze UI</h1>


    <div class="am-header-right am-header-nav">
        <a id="animation-cart" href="#cart-link" class="" data-am-modal="{target: '#my-popup'}">
            <i class="am-header-icon am-icon-shopping-cart">
                <span id="animation-cart-count">0</span>
            </i>
        </a>
        <a href="#user-link" class="">
            <i class="am-header-icon am-icon-envelope-o" data-am-modal="{target: '#my-msg-popup'}">
                <span id="animation-msg-count">0</span>
            </i>
        </a>
    </div>
    -->
</header>

<!--在这里编写你的代码-->
<section data-am-widget="accordion" class="am-accordion am-accordion-gapped"
         data-am-accordion='{ "multiple": true }'>
    <dl class="am-accordion-item am-active">
        <dt class="am-accordion-title">0719</dt>
        <dd class="am-accordion-bd am-collapse am-in">
            <div class="am-accordion-content">
                add厨房页面<br/>
                add收银页面<br/>
                add update_log页面
            </div>
        </dd>
    </dl>
    <dl class="am-accordion-item">
        <dt class="am-accordion-title">0715</dt>
        <dd class="am-accordion-bd am-collapse">
            <div class="am-accordion-content">
                导航前后，菜单前后，厨房页面，财务收钱。以上暂定位第一版范围。
            </div>
        </dd>
    </dl>
    <dl class="am-accordion-item">
        <dt class="am-accordion-title">0711</dt>
        <dd class="am-accordion-bd am-collapse ">
            <div class="am-accordion-content">
                点菜单有详细状态了，添加了通知中心。
            </div>
        </dd>
    </dl>
    <dl class="am-accordion-item">
        <dt class="am-accordion-title">0710</dt>
        <dd class="am-accordion-bd am-collapse ">
            <div class="am-accordion-content">
                有导航了，小购物车有点击效果了
            </div>
        </dd>
    </dl>
</section>

<!--[if (gte IE 9)|!(IE)]><!-->
<script src="http://s.amazeui.org/assets/2.x/js/jquery.min.js"></script>
<!--<![endif]-->
<!--[if lte IE 8 ]>
<script src="http://libs.baidu.com/jquery/1.11.3/jquery.min.js"></script>
<script src="http://cdn.staticfile.org/modernizr/2.8.3/modernizr.js"></script>
<script src="assets/js/amazeui.ie8polyfill.min.js"></script>
<![endif]-->
<script src="http://cdn.amazeui.org/amazeui/2.4.2/js/amazeui.min.js"></script>

<script>
    var $btns = $('#animation-cart');
    var dfds = [];
    var animating = false;
    var animation = 'am-animation-shake';

  $(function() {
    $('.am-btn.am-btn-danger.am-gallery-title').on('click', function() {
       if (!animating) {
        animating = true;

        var self = this;
          var sdfd = new $.Deferred();
          dfds.push(sdfd);
          var $this = $(self)
          if ($.AMUI.support.animation) {
            $this.addClass("am-animation-scale-up").one($.AMUI.support.animation.end, function() {
              $this.removeClass("am-animation-scale-up");
              sdfd.resolve();
            });
          }

        $btns.each(function() {
          var dfd = new $.Deferred();
          dfds.push(dfd);
          var $this = $(this);
          if ($.AMUI.support.animation) {
            $this.addClass(animation).one($.AMUI.support.animation.end, function() {
              $this.removeClass(animation);
              dfd.resolve();
            });
          }
        });

        $.when.apply(null, dfds).done(function() {
          animating = false;
          console.log('[AMUI] - 所有动画执行完成');
          dfds = [];
          biz.addOneToCart()
        });
      }
    });
  });

  var biz = {
    addOneToCart:function(){
        $("#animation-cart-count").html($("#animation-cart-count").text()-0+1);
    }
  }







</script>
</body>
</html>